<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSubstationTable extends Migration{
    /**
     * 分站功能表
     *
     * @return void
     */
    public function up(){
        Schema::create('area_station', function(Blueprint $table){
            $table->engine = 'MyISAM';
            $table->comment = '地区分站表';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->string('station_domain', 100)->unique()->default('')->comment('分站子域名');
            $table->string('station_sign', 100)->unique()->default('')->comment('分站地区标识');
            $table->string('station_name', 100)->default('')->comment('分站地区名称');
            $table->mediumInteger('station_cid')->unique()->unsigned()->default(0)->comment('分站地区编号');
            $table->string('station_title', 255)->default('')->comment('分站标题');
            $table->string('station_keyword', 255)->default('')->comment('分站关键词');
            $table->text('station_description')->default('')->comment('分站描述');
            $table->integer('station_sort')->unsigned()->index('station_sort')->default(0)->comment('分站排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::drop('area_station');
    }
}
